# -*- coding: utf-8 -*-
import json

class obj11:
  pass
fileName = "state.txt"
fileName1 = "url/pageUrl.txt"

def set_state(count,pagination):
  file = open(fileName,"w")
  txt = "count=" + str(count) + "," + 'pagination=' + str(pagination)
  file.write(txt)
  file.close()

def get_state():
  file1 = open(fileName,"r")
  txt = file1.read()
  arr = txt.split(',')
  obj = obj11()
  for item in arr:
    setattr(obj,item.split('=')[0],item.split('=')[1])
  file1.close()
  return obj

# set_state(12,222)
# aa = get_state()
# print(aa.count)


def set_url_list(txt):
  file = open(fileName1,"w")
  file.write(json.dumps(txt))
  file.close()

def get_url_list():
  file1 = open(fileName1,"r")
  txt = file1.read()
  return json.loads(txt)

li = get_url_list()
print(li)